import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";
import Home from "@/pages/Home.vue";
import About from "@/pages/About.vue";
import News from "@/pages/News.vue";
import Detail from "@/pages/Detail.vue";

const router = createRouter({
    // history: createWebHistory(),
    history: createWebHashHistory(),
    routes: [
        {
            name:'shouye',
            path:'/home',
            component: Home
        },
        {
            name: 'xinwen',
            path:'/news',
            component: News,
            children:[
                {
                    name:'xiang',
                    path:'detail',
                    component: Detail
                }
            ]
        },
        {
            name: 'guanyu',
            path:'/about',
            component: About
        }
    ]
})

export default router